$OpenBSD: patch-Makefile_in,v 1.50 2017/06/06 09:15:46 ajacoutot Exp $
Index: Makefile.in
--- Makefile.in.orig
+++ Makefile.in
@@ -95,7 +95,7 @@ DIST_COMMON = $(am__configure_deps) \
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@am__append_5 = io/hpmud/musb_libusb01.c 
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@am__append_6 = -lusb
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_7 = io/hpmud/musb.c 
-@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_8 = -I/usr/include/libusb-1.0
+@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_8 = -I${LOCALBASE}/include/libusb-1.0
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_9 = -lusb-1.0
 @HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@am__append_10 = -Iprotocol/discovery
 @HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@am__append_11 = -l$(SNMPLIB) -lcrypto
@@ -121,7 +121,7 @@ DIST_COMMON = $(am__configure_deps) \
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@am__append_15 = libhpipp.la
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@am__append_16 = libhpdiscovery.la
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@am__append_17 = -Iprotocol/discovery
-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_18 = -I/usr/include/libusb-1.0 
+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@am__append_18 = -I${LOCALBASE}/include/libusb-1.0 
 @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@@QT3_INSTALL_TRUE@am__append_19 = ui/colorcalform2_base.ui ui/settingsdialog_base.ui ui/aligntype6form1_base.ui \
 @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@@QT3_INSTALL_TRUE@	ui/aboutdlg_base.ui ui/imagepropertiesdlg_base.ui ui/paperedgealignform_base.ui ui/aligntype6form2_base.ui \
 @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@@QT3_INSTALL_TRUE@	ui/nodevicesform_base.ui ui/cleaningform_base.ui ui/colorcalform_base.ui ui/devmgr4_base.ui ui/loadpaperform_base.ui \
@@ -4828,13 +4828,13 @@ cups_drv = prnt/drv/hpcups.drv
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@        scan/sane/bb_ledm.c scan/sane/http.h scan/sane/http.c scan/sane/sclpml.c scan/sane/sclpml.h common/utils.c common/utils.h \
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@	scan/sane/escl.h scan/sane/escli.h scan/sane/escl.c
 
-@DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
+@DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -avoid-version
 @DARWIN_BUILD_TRUE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation -version-info 1:0:0
 # The following is a interlibrary dependency that must be compiled first.
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD =  \
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@	libhpip.la libhpmud.la \
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@	libhpipp.la $(DBUS_LIBS) \
-@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@	-lcups -ldl $(am__append_1)
+@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@	-lcups $(am__append_1)
 #libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_CFLAGS =  \
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@	$(DBUS_CFLAGS) -Iprotocol \
@@ -4850,7 +4850,7 @@ cups_drv = prnt/drv/hpcups.drv
 @HPLIP_BUILD_TRUE@	-DCONFDIR=\"$(hplip_confdir)\" -Iprotocol \
 @HPLIP_BUILD_TRUE@	$(am__append_8) $(am__append_10)
 @HPLIP_BUILD_TRUE@libhpmud_la_LDFLAGS = -version-info 0:6:0 -lpthread \
-@HPLIP_BUILD_TRUE@	-ldl $(am__append_6) $(am__append_9) \
+@HPLIP_BUILD_TRUE@	$(am__append_6) $(am__append_9) \
 @HPLIP_BUILD_TRUE@	$(am__append_11)
 @HPLIP_BUILD_TRUE@libhpmud_la_SOURCES = io/hpmud/hpmud.c \
 @HPLIP_BUILD_TRUE@	io/hpmud/mlc.c io/hpmud/model.c \
@@ -4891,7 +4891,7 @@ cups_drv = prnt/drv/hpcups.drv
 @HPLIP_BUILD_TRUE@pstotiff_SCRIPTS = fax/filters/pstotiff
 
 # hplip.state
-@HPLIP_BUILD_TRUE@hplip_statedir = /var/lib/hp
+@HPLIP_BUILD_TRUE@hplip_statedir = /var/db/hp
 @HPLIP_BUILD_TRUE@dist_hplip_state_DATA = 
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@cmddir = $(hplipdir)
@@ -5096,7 +5096,7 @@ cups_drv = prnt/drv/hpcups.drv
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_SOURCES = prnt/hpijs/PrinterProperties.cpp prnt/hpijs/PrinterProperties.h prnt/hpijs/bug.h
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_CXXFLAGS = $(libapdk_la_CXXFLAGS)
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_CFLAGS = $(libapdk_la_CFLAGS)
-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_LDADD = libapdk.la -ljpeg -ldl
+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_LDADD = libapdk.la -ljpeg
 
 # hplip.desktop
 @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@hplip_desktopdir = $(icondir)
@@ -5161,8 +5161,8 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
 
 @HPIJS_INSTALL_TRUE@hpijs_CXXFLAGS = $(libapdk_la_CXXFLAGS)
 @HPIJS_INSTALL_TRUE@hpijs_CFLAGS = $(libapdk_la_CFLAGS)
-@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_FALSE@hpijs_LDADD = libapdk.la -ljpeg -ldl
-@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_TRUE@hpijs_LDADD = libapdk.la -ljpeg -ldl libhpip.la libhpmud.la $(DBUS_LIBS)
+@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_FALSE@hpijs_LDADD = libapdk.la -ljpeg
+@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_TRUE@hpijs_LDADD = libapdk.la -ljpeg libhpip.la libhpmud.la $(DBUS_LIBS)
 
 # hpcups
 #if NEW_HPCUPS
@@ -5202,7 +5202,7 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
 @HPCUPS_INSTALL_TRUE@	common/utils.c common/utils.h
 
 @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -ljpeg -ldl -lcups -lcupsimage $(DBUS_LIBS)
+@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -ljpeg -lcups -lcupsimage $(DBUS_LIBS)
 
 #else
 #hpcupsdir = $(cupsfilterdir)
@@ -5211,15 +5211,15 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
 #hpcups_CXXFLAGS = $(libapdk_la_CXXFLAGS)
 #hpcups_CFLAGS = $(libapdk_la_CFLAGS)
 #if HPCUPS_ONLY_BUILD
-#hpcups_LDADD = libapdk.la -ljpeg -ldl -lcups -lcupsimage
+#hpcups_LDADD = libapdk.la -ljpeg -lcups -lcupsimage
 #else
-#hpcups_LDADD = libapdk.la -ljpeg -ldl libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -lcupsimage
+#hpcups_LDADD = libapdk.la -ljpeg libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -lcupsimage
 #endif #HPCUPS_ONLY_BUILD
 #endif # NEW_HPCUPS
 # hpcupsfax
 @FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfaxdir = $(cupsfilterdir)
 @FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfax_SOURCES = prnt/hpijs/hpcupsfax.cpp prnt/hpijs/hpcupsfax.h common/utils.h common/utils.c
-@FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfax_LDADD = libhpip.la -lcups -lcupsimage -ldl
+@FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfax_LDADD = libhpip.la -lcups -lcupsimage
 
 # PPDs
 ppddir = $(hpppddir)
